package com.tuanzi.loan.web.lazy.galaxycard;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import org.springframework.data.domain.Page;

import com.tuanzi.loan.vo.request.galaxycard.DistributionStatSearchRequest;
import com.tuanzi.loan.vo.response.galaxycard.GalaxyCardDistributionStatSearchResponse;
import com.tuanzi.loan.business.service.galaxycard.GalaxyCardDistributionStatService;

/**
 * 分销统计 DataModel
 * @author JinRuiyang 2018/3/1 17:58:20
 */
public class GalaxyCardDistributionStatDataModel extends
        BaseLazyDataModel<DistributionStatSearchRequest, GalaxyCardDistributionStatSearchResponse> {

    private GalaxyCardDistributionStatService galaxyCardDistributionStatService = SpringContextHolder.getBean(GalaxyCardDistributionStatService.class);

    public GalaxyCardDistributionStatDataModel(DistributionStatSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<GalaxyCardDistributionStatSearchResponse> doLoad(PageSearcher<DistributionStatSearchRequest> pageSearcher) {
        return galaxyCardDistributionStatService.list(pageSearcher);
    }
}
